<?php
	function check_loginuser(){
		if(!$_SESSION['id']) {
			echo "<script language='javascript'>alert('请登录');top.location.href='http://localhost/QC_System/login.php';</script>";
		}
	}
	
	function check_login(){
		if(!$_SESSION['adminid']) {
			echo "<script language='javascript'>top.location.href='http://localhost/QC_System/admin/login.php';</script>";
		}
	}
	
	function goBakMsg($msg)
	{	
		echo "<script language='javascript'>alert('".$msg."');history.go(-1);</script>";
	}
	
	function urlMsg($msg,$url)
	{	
		echo "<script language='javascript'>alert('".$msg."');location.href='$url';</script>";
	}
?>